package com.lanou.utp.entity;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.annotation.JsonInclude;
import lombok.Data;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import java.io.Serializable;
import java.util.Date;

/**
 * @author MaQingYun
 */

@JsonInclude(JsonInclude.Include.NON_NULL)
@Data
public class Base implements Serializable {

    public interface addBaseInfo { };

    private Long id; /* 基地id */
    @NotBlank(message = "不能为空", groups = {addBaseInfo.class})
    private String name; /* 基地名称*/

    @NotBlank(message = "不能为空", groups = {addBaseInfo.class})
    private String address; /*基地地址 */

    @NotBlank(message = "不能为空", groups = {addBaseInfo.class})
    private String contacts; /* 联系人 */

    @NotBlank(message = "不能为空", groups = {addBaseInfo.class})
    private String tel; /*手机号*/

    private String nature; /*企业性质*/
    private String business; /* 企业主营业务*/

    @NotNull(message = "不能为空", groups = {addBaseInfo.class})
    private Integer max; /* 接收人数上限*/

    @NotBlank(message = "不能为空", groups = {addBaseInfo.class})
    private String longitude; /* 经度 */

    @NotBlank(message = "不能为空", groups = {addBaseInfo.class})
    private String latitude; /* 维度 */

    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private Date createTime;/*创建时间*/

    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private Date updateTime;/*更新时间*/

    private Integer status;/*状态*/


}
